<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@include file="/common/taglibs.jsp"%>

<!DOCTYPE html>
<html class='no-js' lang='cn'>
  <jsp:include page="/head.jsp"/>
  <body class='main page'>
  <jsp:include page="/top.jsp"/>
  
  <div id='wrapper'>
   	<section id='tools'>
        <ul class='breadcrumb' id='breadcrumb'>
          <li class='title'>代理服务器列表</li>
          <li class='active'>${_jobType}</li>
        </ul>
        <div id='toolbar'>
          <div class='btn-group'>
            <a class='btn' data-toggle='toolbar-tooltip' href='${ctx }/proxy/foradd' title='Add'>
              <i class='icon-plus'></i>
            </a>
          </div>
        </div>
      </section><!-- Sidebar -->
  <jsp:include page="/sidebar.jsp"/>
    
      <!-- Content -->
      <div id='content'>
          
          <table class='table'>
            <thead>
              <tr>
                <th>代理IP</th>
                <th>代理端口</th>
                <th>代理用户名</th>
                <th>代理密码</th>
                <th>代理成功数量</th>
                <th>代理失败数量</th>
                <th>代理描述</th>
                <th>创建时间</th>
                <!-- <th>创建者</th> -->
                <th>修改时间</th>
                <!-- <th>修改者</th> -->
                <th class="text-right">操作</th>
              </tr>
            </thead>
            <tbody>
              <c:forEach var="obj" items="${obj.rows }" varStatus="status">
              <tr class='${ status.index%2==0?'success':''}' id="row_${obj._id}">
                <td>${obj.proxy_ip }</td>
                <td>${obj.proxy_port }</td>
                <td>${obj.proxy_username }</td>
                <td>${obj.proxy_password }</td>
                <td><c:choose><c:when test="${obj.proxy_succ_num == null}">0</c:when><c:otherwise>${obj.proxy_succ_num}</c:otherwise></c:choose></td>
                <td><c:choose><c:when test="${obj.obj.proxy_err_num == null}">0</c:when><c:otherwise>${obj.obj.proxy_err_num}</c:otherwise></c:choose></td>
                <td>${obj.proxy_remark }</td>
                <td><fmt:formatDate pattern="yyyy-MM-dd HH:mm:ss" value="${obj.create_date}" /></td>
                <%-- <td>${obj.create_userid}</td> --%>
                <td><fmt:formatDate pattern="yyyy-MM-dd HH:mm:ss" value="${obj.update_date }" /></td>
                <%-- <td>${obj.update_userid }</td> --%>
                <td class='text-right'>
                  <a class='btn btn-info' href="${ctx }/proxy/get/${obj._id}">
                    <i class='icon-edit'></i>
                  </a>
		           <a class='btn btn-danger' href='javascript:;' onclick="deleteProxy('${obj._id}')">
                    <i class='icon-trash'></i>
                  </a>
                </td>
              </tr>
              </c:forEach>
            </tbody>
          </table>
          <div class='panel-footer'>
            <ul class='pagination pagination-sm '>
              <li>
                <a href='#'>«</a>
              </li>
              <li class='active'>
                <a href='#'>1</a>
              </li>
              <li>
                <a href='#'>2</a>
              </li>
              <li>
                <a href='#'>3</a>
              </li>
              <li>
                <a href='#'>4</a>
              </li>
              <li>
                <a href='#'>5</a>
              </li>
              <li>
                <a href='#'>»</a>
              </li>
            </ul>
          </div>
        </div>
       </div>
    <jsp:include page="/foot.jsp"/>
    <!-- 代理模块 JS配置 -->
	<script src="${ctx }/js/proxy/proxy.js"></script>
  </body>
</html>
